﻿// <copyright file="AmbientLight.cs" company="Axelerate Solutions S.A.">
// Copyright (c) Axelerate Solutions S.A.  All rights reserved.
// </copyright>

namespace Axelerate.Silverlight3D.Media.Media3D
{
    using System;
    using System.Net;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Documents;
    using System.Windows.Ink;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Animation;
    using System.Windows.Shapes;
        
    /// <summary>
    /// File name: AmbientLigth.cs
    /// Company: Axelerate Solutions S.A.
    /// Created By: Daniel Rojas
    /// Created Date: 10/10/2008 11:53:00 h.
    /// Description: Light object that applies light to objects uniformly, regardless of their shape.
    ///   <Modifications>
    ///   </Modifications>
    /// </summary>
    public sealed class AmbientLight : Light
    {
        #region Constructors
        
        /// <summary>
        /// Initializes a new instance of the AmbientLight class.
        /// </summary>
        public AmbientLight() : this(Colors.DarkGray)
        {
        }

        /// <summary>
        /// Initializes a new instance of the AmbientLight class with the specified color.
        /// </summary>
        /// <param name="ambientColor">Color of the new light.</param>
        public AmbientLight(Color ambientColor)
        {
            this.Color = ambientColor;
        }

        #endregion

        protected override Rect3D GetBounds()
        {
            return Rect3D.Empty;
        }

        internal override void CreateRenderEntities(RenderEntityPool entityPool)
        {
            base.CreateRenderEntities(entityPool);
        }



        internal override Point3D GetColorIntencityByNormal(Vector3D Normal)
        {
            return new Point3D((double)Color.R / 255.0f, (double)Color.G / 255.0f, (double)Color.B / 255.0f);
        }
    }
}
